Skip to content

feat(react): add Tour component#88

Merged
wangdicoder merged 2 commits intomasterfrom
feat/tour-component
Apr 4, 2026
Merged

feat(react): add Tour component#88
wangdicoder merged 2 commits intomasterfrom
feat/tour-component

Conversation

@wangdicoder
Copy link
Copy Markdown
Owner

Summary

  • Add new Tour component for step-by-step product guides
  • SVG spotlight mask with smooth animated transitions between steps
  • Popper.js positioning with all 12 placements and auto-flip
  • Keyboard navigation (Escape to close, Arrow keys to navigate)
  • Scroll into view when target is offscreen
  • Two visual types: default (white) and primary (colored)
  • Centered panel when step has no target element
  • Customizable gap (offset + radius) for spotlight cutout
  • Custom step indicators via indicatorsRender
  • Cover image/video support per step
  • Custom button text via nextButtonProps / prevButtonProps
  • disabledInteraction to block clicks on highlighted targets
  • i18n support (English + Chinese locale strings)
  • 9 demo examples and full API docs (EN + ZH)
  • 17 unit tests

Release

  • Bump type: minor
  • Affected packages: @tiny-design/react (fixed group: tokens + icons version together)

Test plan

  • Run pnpm test — 17 tour tests should pass
  • Run pnpm dev — verify Tour page renders in docs site
  • Test basic demo: click Start Tour, navigate with Next/Previous/Finish
  • Test primary type, placement, no-target (centered), no-mask demos
  • Test cover image, custom gap (slider), custom indicator, custom button demos
  • Test keyboard: Escape closes, ArrowLeft/Right navigates
  • Verify spotlight animates smoothly between steps
  • Verify close button is the only way to dismiss (mask click does not close)

🤖 Generated with Claude Code

Add a new Tour component for step-by-step product guides, similar to
Ant Design's Tour. Features include SVG spotlight mask with animated
transitions, Popper.js positioning, keyboard navigation, scroll into
view, customizable indicators, cover images, and i18n support.
@wangdicoder wangdicoder merged commit 57c2f38 into master Apr 4, 2026
1 check passed
@wangdicoder wangdicoder deleted the feat/tour-component branch April 4, 2026 05:20
@github-actions github-actions Bot mentioned this pull request Apr 4, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant